#Contains the soil hydraulic parameters of sandy clay loam and the function
#for converting volumetric soil moisture to pressure head.

import numpy as np 
pars_MZs = np.loadtxt('./core_mz3/Parameters_LSTM.txt')

def ManagementZone_3():
    soilPars = {}
    soilPars['thetaR'] = pars_MZs[2,4]
    soilPars['thetaS'] = pars_MZs[2,1]
    soilPars['alpha']  = pars_MZs[2,2]
    soilPars['n']      = pars_MZs[2,3]
    soilPars['m']      = 1-1/soilPars['n']
    soilPars['Ks']     = (pars_MZs[2,0])/86400
    soilPars['neta']   = 0.5
    soilPars['Ss']     = 0.00001

    return soilPars

def ConvertToPressureHead(volMoisture,soilPars):
	#Dependence of pressure head on the volumetric moisture content
	presHead = (((((volMoisture - soilPars['thetaR']) / (soilPars['thetaS'] - soilPars['thetaR'])) ** (1. / (-(1-1/(soilPars['n']))))
              - 1)) ** (1. / (soilPars['n']))) / (-soilPars['alpha'])
	return presHead
